(defvar current-user
      (getenv
       (if (equal system-type 'windows-nt) "USERNAME" "USER")))

(when (version< emacs-version "24.1")
  (error "Crazy Emacs requires at least GNU Emacs 24.1, but you're running %s" emacs-version))

;; Always load newest byte code
(setq load-prefer-newer t)

(defvar emacs-dir (file-name-directory load-file-name)
  "The root dir of the Emacs Crazy distribution.")
(defvar emacs-core-dir (expand-file-name "core" emacs-dir)
  "The home of Crazy Emacs's init functionality.")
(defvar emacs-config-dir (expand-file-name "config" emacs-dir)
  "The home of Crazy Emacs's config functionality.")
(defvar emacs-packages-dir (expand-file-name "el-get" emacs-dir)
  "The home of Crazy Emacs's packages functionality.")
(defvar emacs-savedir (expand-file-name "savefile" emacs-dir))
(add-to-list 'load-path emacs-core-dir)
(add-to-list 'load-path emacs-config-dir)

(setq gc-cons-threshold 50000000)

;; warn when opening files bigger than 100MB
(setq large-file-warning-threshold 100000000)

(message "Loading Crazy Emacs's init files...")
(require 'init-packages)
(require 'init-ui)
(require 'init-editor)
(require 'init-keybinding)
(message "Loading Crazy Emacs's config files...")
(require 'init-config)

;;; init.el ends here
(put 'set-goal-column 'disabled nil)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ede-project-directories (quote ("/home/hujianxin/temp"))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
